package router

import (
	"github.com/gin-gonic/gin"
	"seat-service/api"
)

type dictionaryRouter struct {
}

func (*dictionaryRouter) dictionaryRouterGroup(Router *gin.RouterGroup) *gin.RouterGroup {
	dictionary := Router.Group("dictionary")
	dictionaryApi := api.DictionaryApi{}
	{
		dictionary.POST("add-master", dictionaryApi.AddMaster)              //添加主字典数据
		dictionary.GET("del-master", dictionaryApi.DeleteMaster)            // 根据id删除主字典数据
		dictionary.POST("del-master", dictionaryApi.BatchDeleteMaster)      // 根据id批量删除主字典数据
		dictionary.POST("update-master", dictionaryApi.UpdateMaster)        //修改主字典数据
		dictionary.GET("", dictionaryApi.QueryMaster)                       // 查询主字典数据
		dictionary.GET("condition-master", dictionaryApi.QueryMasterByType) // 根据类型名称或者编码查询主字典数据

		dictionary.POST("add-slave", dictionaryApi.AddSlave)
		dictionary.GET("del-slave", dictionaryApi.DeleteSlave)
		dictionary.POST("del-slave", dictionaryApi.BatchDeleteSlave)
		dictionary.POST("update-slave", dictionaryApi.UpdateSlave)
		dictionary.GET("slave", dictionaryApi.QuerySlave)
		dictionary.GET("condition-slave", dictionaryApi.QuerySlaveByName)
	}

	return dictionary
}
